<include file="./Application/Admin/View/header.html" />
<script type="text/javascript">
	$(function (){
		var sche = "{$sche}";
		var str = "width: " + sche + "%";
		$('.bar').attr('style', str);

		$('#subm').click(function (){
			if ($("input[name='dbname']").val() == '' || $("input[name='referer']").val() == '' || $('#textarea').val() == ''){
				alert('关键字段不能为空!');
				return false;
			}
		})
		
	})

</script>
	<body>
		<div class="container">
			<div class="navbar">
				<include file="./Application/Admin/View/header2.html" />
				</div>
			</div>
				<include file="./Application/Admin/View/left.html" />
				<div class="span9">
					<h1>
						数据库列表
					</h1>
					<table class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>
									数据库名称
								</th>
								
								<th>
									是否入库
								</th>
								<th>
									来 源
								</th>
								<th>
									下载进度
								</th>
								<th>
									操作
								</th>
							</tr>
						</thead>
						<tbody>
						<foreach name="result" item="v">
							<tr>
								<td>
									{$v['name']}
								</td>
								<td>
									<span class="badge">{$v['done']}</span>
								</td>
								<td>
									<span class="badge">{$v['referer']}</span>
								</td>
								<td>
									<input type="hidden" name="process" value="{$v['downsche']}" />
									<div class="progress">
										<div class="bar" style="width: 0%;"></div>
									</div>
								</td>
								<td>
									<div align="center">
									<a href="{:U('Manage/preview', array('id'=>$v['id']), '')}">预览</a>
									</div>
								</td>
							</tr>
						</foreach>
						</tbody>
					</table>
					<a class="toggle-link" href="#new-project"><i class="icon-plus"></i> New DataBase</a>
					<form id="new-project" class="form-horizontal hidden" method="post">
						<fieldset>
							<legend>New DataBase</legend>
							<div class="control-group">
								<label class="control-label" for="input01">数据库名称</label>
								<div class="controls">
								<input type="text" class="input-xlarge" name="dbname" id="input01" />
								</div>
							</div>
							<div class="control-group">
							<label class="control-label" for="input01">来 源</label>
								<div class="controls">
								<input type="text" class="input-xlarge" name="referer" id="input01" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="select01">节 点</label>
								<div class="controls">
									<select id="select01" name="client"> <option>-- Select client --</option> <option>Bad Robot</option> <option>Evil Genius</option> <option>Monsters Inc</option> </select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="textarea">下载链接</label>
								<div class="controls">
									<textarea name="link" class="input-xlarge" id="textarea" rows="3"></textarea>
								</div>
							</div>
							<div class="form-actions">
								<button type="submit" id="subm" class="btn btn-primary">Create</button> <button class="btn">Cancel</button>
							</div>
						</fieldset>
					</form>
				</div>
			</div>
		</div>
=
	</body>
</html>
